import logging,yagmail

def Log():
    logging.basicConfig(level=logging.INFO,
                        format='%(asctime)s-> %(levelname)s-> %(filename)s-> %(message)s',
                        filename='log.txt',
                        filemode='a+')

def send_email(filepath):
    email=yagmail.SMTP(user='3177622011@qq.com',password='xjwzrxaryqjydece',host='smtp.@qq.com')
    email.send(to='3177622011@qq.com',subject='测试报告',contents='接口测试',attachments=filepath)